package com.wuage.interfaces.permission.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * @author Shynin
 * @version 1.0
 * @date 9/29/21 10:20 AM
 */
@Data
@ApiModel("权限创建对象")
public class CreateOrUpdatePermissionDO {

    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("权限类型 MENU or BUTTON")
    @NotBlank(message = "权限类型不能为空")
    private String type;

    @ApiModelProperty("级别")
    @NotNull(message = "级别不能为空")
    private Integer level;

    @ApiModelProperty("权限名字")
    @NotBlank(message = "权限名字不能为空")
    private String menuName;

    @ApiModelProperty("上级权限id，如果没有上级则传0")
    @NotNull(message = "上级权限不能为空")
    private Long parentId;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("按钮权限标志 菜单可为空")
    private String permit;

    @ApiModelProperty("前端路由")
    private String frontUrl;

    @ApiModelProperty("图标url")
    private String iconUrl;
}
